program task_77g;

{$mode objfpc}{$H+}

uses
  math,
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes
  { you can add units after this };

var
  i, n: integer;
  s, m: real;
begin
  writeln('task 77g');
  writeln('enter n:');
  readln(n);

  s := 0;
  m := 0;
  for i := 1 to n do
  begin
    m := m + sin(i);
    s := s + 1/m;
  end;

  writeln('sum for ', n, ' is ', s:3:3);
  readln;
end.

